<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title></title>
</head>

<body style="width: 1200px; height: 1000px;">
<div id="Tdiv" style="position: absolute;">
    <img id="image1" src="img.jpg" height="200">
</div>
<script type="text/javascript">
var ImgH=image1.height;
function permute(tfloor){
    var RealLeft=document.body.scrollLeft || document.documentElement.scrollLeft;
    document.getElementById(tfloor).style.left=RealLeft+"px";
    var RealTop=document.body.scrollTop || document.documentElement.scrollTop;
    var bHeight=document.documentElement.clientHeight;
    var buyTop=RealTop+bHeight-ImgH;
    document.getElementById(tfloor).style.top=buyTop+"px";
}
setInterval('permute("Tdiv")',1);
</script>
</body>
</html>
